class FileObject:
    def __init__(self, file_path):
        self.f = open("file_path",'r', encoding = 'utf-8')
    def __del__(self):
        self.f.close()
        del self.f

